import Router from 'koa-router';
import proxyService from '../../common/proxyService';
// import {
//   getPayAuditList,
//   removePayAudit,
//   getPayAuditInfo,
//   getApiKey,
//   changeAuditStatus,
//   saveAuditReason,
// } from '../../api/manage_payaudit';
const router = new Router();

//获取列表支付审核信息
router.post('/getPayAuditList', async ctx => {
  //     const response = await proxyService.postProxy(ctx, getPayAuditList);
  const response = await proxyService.mockData({
    code: 1,
    data: {
      limit: 20,
      offset: 0,
      totalCount: 79,
      records: [
        {
          companyName: '杭州正点',
          oerder: '64649252',
          name: '刘先生',
          telephone: '18695685698',
          createTime: '2019-12-05 23:11:42',
          checkTime: '2019-12-07 23:11:42',
          id: 123,
          status: 0,
          wxAvatar:
            'http://thirdwx.qlogo.cn/mmopen/PiajxSqBRaEIzysJfK8icuyZdvUQybQFVyNkzqcfooLJpz70RB2scy6icGwWUO4uR4NYwwJnamMhWjwhcA7fYTLnw/132',
          wxName: 'windfly',
          wxNickname: '',
        },
        {
          companyName: '杭州正点科技',
          oerder: '64649424',
          name: '李先生',
          telephone: '15695685698',
          createTime: '2019-12-05 23:11:42',
          checkTime: '2019-12-07 23:11:42',
          id: 125,
          status: 1,
          time: '2019-12-05 22:36:53',
          wxAvatar:
            'http://thirdwx.qlogo.cn/mmopen/PiajxSqBRaEIzysJfK8icuyZdvUQybQFVyNkzqcfooLJpz70RB2scy6icGwWUO4uR4NYwwJnamMhWjwhcA7fYTLnw/132',
          wxName: 'windfly',
          wxNickname: '',
        },
        {
          companyName: '杭州正点科技有限公司',
          oerder: '64649626',
          name: '王先生',
          telephone: '17695685698',
          createTime: '2019-12-05 23:11:42',
          checkTime: '2019-12-07 23:11:42',
          id: 124,
          status: 2,
          time: '2019-12-05 22:36:53',
          wxAvatar:
            'http://thirdwx.qlogo.cn/mmopen/PiajxSqBRaEIzysJfK8icuyZdvUQybQFVyNkzqcfooLJpz70RB2scy6icGwWUO4uR4NYwwJnamMhWjwhcA7fYTLnw/132',
          wxName: 'windfly',
          wxNickname: '',
        },
      ],
    },
    message: 'mock data success',
  });
  return (ctx.body = response);
});
// 删除审核信息
router.post('/removePayAudit', async ctx => {
  // const response = await proxyService.postProxy(ctx, removePayAudit);
  const response = await proxyService.mockData({
    code: 1,
    data: {},
    message: 'mock data success',
  });
  return (ctx.body = response);
});

//获取审核信息
router.post('/getPayAuditInfo', async ctx => {
  //     const response = await proxyService.postProxy(ctx, getPayAuditList);
  const response = await proxyService.mockData({
    code: 1,
    data: {
      accountId: 2009,
      accountImg:
        'http://wx.qlogo.cn/mmopen/BwG8A2BLRXlUnK1mGiauZOWN6lgjzJyxFMjUwJHKrmZ5aBszFUGKQ1HVZNXLcibgJYZ5ibX7GSCnPkKJmb7lAViaeZCFC6Tiayahb/0',
      accountName: '嘉臣一点通',
      activityId: 2253,
      activityName: '测试裂变',
      activityType: 1,
      allowConcat: 0,
      companyId: 5,
      companyName: '杭州正点科技有限公司',
      oerder: '64649424',
      name: '刘先生',
      telephone: '18695685698',
      complainantImg:
        'http://thirdwx.qlogo.cn/mmopen/PiajxSqBRaEIzysJfK8icuyZdvUQybQFVyNkzqcfooLJpz70RB2scy6icGwWUO4uR4NYwwJnamMhWjwhcA7fYTLnw/132',
      complainantName: 'windfly',
      complaintAction: '测试裂变',
      complaintContent: '哈哈哈哈哈',
      complaintReason: 107,
      complaintType: null,
      compllaintTime: '2019-12-05 23:11:42',
      contact: 0,
      createId: 0,
      createTime: '2019-12-05 23:11:42',
      checkTime: '2019-12-07 23:11:42',
      evidenceImg:
        'xds-10-2-1255528578.cos.ap-shanghai.myqcloud.com/img/complaint/5/1-1-1ad84418137808132646c99220843d68.jpg,xds-10-2-1255528578.cos.ap-shanghai.myqcloud.com/img/complaint/5/1-1-39b7a11d4ac15b9b689de7638bf4d1c0.jpg,xds-10-2-1255528578.cos.ap-shanghai.myqcloud.com/img/complaint/5/1-1-0d98d2db49c993e18c4e7318bb4ae73a.jpg',
      evidenceUrl: null,
      id: 123,
      module: '裂变宝',
      money: null,
      noticeId: 4415,
      noticeType: 7,
      publicAccountAvatar:
        'http://wx.qlogo.cn/mmopen/BwG8A2BLRXlUnK1mGiauZOWN6lgjzJyxFMjUwJHKrmZ5aBszFUGKQ1HVZNXLcibgJYZ5ibX7GSCnPkKJmb7lAViaeZCFC6Tiayahb/0',
      publicAccountName: '嘉臣一点通',
      rankId: 296,
      reason: '其他',
      status: 0,
      time: '2019-12-05 22:36:53',
      verificationStatus: 0,
      verificationTime: null,
      wxAvatar:
        'http://thirdwx.qlogo.cn/mmopen/PiajxSqBRaEIzysJfK8icuyZdvUQybQFVyNkzqcfooLJpz70RB2scy6icGwWUO4uR4NYwwJnamMhWjwhcA7fYTLnw/132',
      wxName: 'windfly',
      wxNickname: '',
    },
    message: 'mock data success',
  });
  return (ctx.body = response);
});

//获取api密匙
router.post('/getApiKey', async ctx => {
  // const response = await proxyService.postProxy(ctx, getApiKey);
  const response = await proxyService.mockData({
    code: 1,
    data: {
      wxshopnum: '5965232',
      APIkey: '841654681614685631dsahoidhfi6sd',
      IPfile: 'jshdk.txt',
    },
    message: 'mock data success',
  });
  return (ctx.body = response);
});

//修改审核状态
router.post('/changeAuditStatus', async ctx => {
  // const response = await proxyService.postProxy(ctx, changeAuditStatus);
  const response = await proxyService.mockData({
    code: 1,
    data: {},
    message: 'mock data success',
  });
  return (ctx.body = response);
});
// 保存审核理由
router.post('/saveAuditReason', async ctx => {
  // const response = await proxyService.postProxy(ctx, saveAuditReason);
  const response = await proxyService.mockData({
    code: 1,
    data: {},
    message: 'mock data success',
  });
  return (ctx.body = response);
});
export default router;
